import request from '@/utils/request'

// 创建团款项目
export function createOrdePayment(data) {
  return request({
    url: '/team/orde-payment/create',
    method: 'post',
    data: data
  })
}
// 批量创建团款项目
export function createBatchOrdePayment(data) {
  return request({
    url: '/team/orde-payment/createBatch',
    method: 'post',
    data: data
  })
}

// 更新团款项目
export function updateOrdePayment(data) {
  return request({
    url: '/team/orde-payment/update',
    method: 'put',
    data: data
  })
}

// 删除团款项目
export function deleteOrdePayment(id) {
  return request({
    url: '/team/orde-payment/delete?id=' + id,
    method: 'delete'
  })
}

/** 批量删除团款项目 */
export function deleteOrdePaymentList(ids) {
  return request({
    url: `/team/orde-payment/delete-list?ids=${ids.join(',')}`,
    method: 'delete'
  })
}

// 获得团款项目
export function getOrdePayment(id) {
  return request({
    url: '/team/orde-payment/get?id=' + id,
    method: 'get'
  })
}

// 获得团款项目分页
export function getOrdePaymentPage(params) {
  return request({
    url: '/team/orde-payment/page',
    method: 'get',
    params
  })
}
// 导出团款项目 Excel
export function exportOrdePaymentExcel(params) {
  return request({
    url: '/team/orde-payment/export-excel',
    method: 'get',
    params,
    responseType: 'blob'
  })
}